#ifndef EXCEPTIONS_H
#define	EXCEPTIONS_H

#include "midifileapi.h"
#include <exception>
#include <new>

namespace MidiFile {

class MIDIFILE_DLL Exception : public std::exception {
public:
    Exception(const char *message) throw (std::bad_alloc);
    Exception(const Exception &other) throw ();
    ~Exception() throw ();

    Exception & operator=(const Exception &other) throw ();
    const char* what() const throw ();
private:
    char *message;
};

class MIDIFILE_DLL FileException : public Exception {
public:
    FileException();
    FileException(const char *message);
};

class MIDIFILE_DLL NotLoadedException : public Exception {
public:
    NotLoadedException();
    NotLoadedException(const char *message);
};

class MIDIFILE_DLL InvalidException : public Exception {
public:
    InvalidException();
    InvalidException(const char *message);
};
}

#endif	/* EXCEPTIONS_H */

